#include "comm.hpp"

int main()
{
  key_t key = GetKey();
  int shmid = GetShm();

  char *shmaddr = (char *)shmat(shmid, nullptr, SHM_RDONLY);
  char msg[sharemem_size];
  while (1)
  {
    sleep(1);
    memcpy(msg, shmaddr, sharemem_size-1);
    cout << "Client Say@ " << msg << endl;
  }

  shmdt(shmaddr);
}